<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateConvertRecordsTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up()
    {
        Schema::create('convert_records', function (Blueprint $table) {
            $table->id();
            $table->timestamps();
            $table->bigInteger('user_id')->index()->comment('用户ID');
            $table->bigInteger('convert_formula_id')->index()->comment('合成公式ID');
            $table->integer('convert_count')->comment('合成数量');
            $table->string('status', 16)->comment('合成状态');
            $table->text('remark')->nullable()->comment('备注信息');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down()
    {
        Schema::dropIfExists('convert_records');
    }
}
